Adjoint sensitivity determination for nonlinear circuit models

ABSTRACT

An adjoint network method is used to determine the sensitivity of an electronic circuit model to variations in circuit components. The effects of nonlinear circuit elements are represented by augmenting the elements of the adjoint network. In particular, deviations away from linearity are represented in the original circuit by “fictitious” voltage sources. These voltage sources will map into “fictitious” current sources in the adjoint network. These sources are not static; they are directly proportional to the adjoint current through the branch corresponding to the nonlinear element. As such they may be classified as current-controlled current sources and are sometimes referred to as “correction” sources.

TECHNICAL FIELD

[0001] The present invention relates to computerized modeling ofelectronic circuits and, in particular, to computerized analysis ofelectronic circuit sensitivities by an adjoint method.

SUMMARY

[0002] Electronic circuit computer simulators such as SPICE, HSPICE,Spectre, etc., are commonly used to model various characteristics ofelectronic circuit operation. These simulators formulate and solve thenonlinear algebraic differential equations associated with an electroniccircuit design, as is known in the art. To improve electronic circuitdesign efficiency, the sensitivity of an electronic circuit tovariations in circuit components is sometimes analyzed to identifycomponents that are particularly sensitive to variations. In thisregard, circuit sensitivity quantizes the effect on the performance of acircuit caused by some variation in a circuit component.

[0003] Two main methods have been used for sensitivity computation: thedirect method and the adjoint method. The direct method is efficient inthe computation of several outputs with respect to one component. Theadjoint method is efficient in the computation of the sensitivity of oneoutput with respect to all the components. As a result, the adjointmethod is typically more efficient in circuit sensitivity computationsbecause most circuits have far more circuit components than outputs. Asimple extension allows the adjoint method to generate the sensitivityof a function of several outputs. The adjoint method typically entails afirst or original simulation of the circuit in its original form,determination of an adjoint circuit corresponding to the originalcircuit, and then a simulation of the adjoint circuit.

[0004] As is known in the art, nonlinearities in the original simulationmay be handled by linearizing about a certain point. The quiescent oroperating point is found by successively finer approximations about thispoint. Typically, after the operating point is found, the variousnonlinear elements are treated as linear and are assigned the impedancevalues, etc that the elements would have at the operating point. Thisassures the linear circuit mimics the original nonlinear circuit at thatpoint.

[0005] The adjoint method is invoked in order to calculate thesensitivities of observables with respect to various resistors, etc. Inthe usual implementation, the nonlinear devices are fixed at theiroperating point values. But if the circuit is changed slightly, such asby adjusting the parameters, the nonlinear devices would in realitychange their impedances, etc. as the circuit changes. This change is notreflected in the fixed values used in the typical adjoint method. Thisis sometimes referred to as the operating point shift problem.

[0006] The present invention enhances the adjoint network method. Theeffects of nonlinear circuit elements are represented by augmenting theelements of the adjoint network. In particular, deviations away fromlinearity are represented in the original circuit by “fictitious”voltage sources. These voltage sources will map into “fictitious”current sources in the adjoint network. These sources are not static;they are directly proportional to the adjoint current through the branchcorresponding to the nonlinear element. As such they may be classifiedas current-controlled current sources and are sometimes referred to as“correction” sources.

[0007] Accordingly, an electronic circuit sensitivity analysis methodfor analyzing sensitivity of an electronic circuit model as representedby electronic circuit model data includes conducting a first computersimulation of the electronic circuit model and receiving results of thefirst simulation. A nonlinear circuit element is identified in theelectronic circuit model and a nonlinear effect of the nonlinear circuitelement is represented by applying a corresponding voltage source to theelectronic circuit model.

[0008] An adjoint of the electronic circuit model is generated basedupon the results of the first simulation, including mapping thecorresponding voltage source into a current source in the adjoint. Asimulation of the adjoint of the electronic circuit model is conductedand a circuit sensitivity analysis of the electronic circuit model isconducted based upon the results of the simulations of the electroniccircuit model and the adjoint to it.

[0009] Additional objects and advantages of the present invention willbe apparent from the detailed description of the preferred embodimentthereof, which proceeds with reference to the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

[0010]FIG. 1 illustrates an operating environment for an embodiment ofthe present invention.

[0011]FIG. 2 is a functional block diagram illustrating functionsperformed by an electronic circuit optimization modeling softwareengine.

[0012]FIG. 3 is a component block diagram illustrating an implementationof a sensitivity analysis software for performing sensitivity analysis.

[0013]FIG. 4 is a circuit schematic diagram of circuit components of asimple operational amplifier circuit to illustrate typical electroniccircuit modeling.

[0014]FIG. 5 shows an ideal voltage-controlled resistor to illustrateoperation of an adjoint method.

[0015]FIG. 6 is a graph showing differences between exact anduncorrected adjoint circuit characterizations.

[0016]FIG. 7 is a graph illustrating an optimization error that canarise from uncorrected adjoint circuit characterizations.

[0017]FIG. 8 illustrates a nonlinear element in which the current acrossthe element is a function of the voltages at the two terminal nodes ofthe element.

[0018]FIG. 9 illustrates the nonlinear element of FIG. 8 withcorresponding substitute voltage sources for nonlinear effects and acorresponding adjoint circuit.

[0019]FIG. 10 is a graph of current-voltage relationships for again-specified voltage-controlled current source.

[0020]FIG. 11 is a flow diagram illustrating an adjoint sensitivitymethod.

[0021]FIG. 12 is a schematic diagram of a circuit that is ageneralization of the sample circuit of FIG. 5.

[0022]FIG. 13 is a diagram of an adjoint circuit corresponding to thecircuit of FIG. 12.

[0023]FIG. 14 shows a multistage voltage-controlled resistor circuitthat was used to test the adjoint network corrections described above.

[0024]FIG. 15 is graph of input voltage versus operating point voltagefor the multistage voltage-controlled resistor circuit of FIG. 14.

[0025]FIG. 16 is a graph illustrating corrected and uncorrectedsensitivities for multistage voltage-controlled resistors.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

[0026]FIG. 1 illustrates an operating environment for an embodiment ofthe present invention as a computer system 20 with a computer 22 thatcomprises at least one high speed processing unit (CPU) 24 inconjunction with a memory system 26, an input device 28, and an outputdevice 30. These elements are interconnected by at least one busstructure 32.

[0027] The illustrated CPU 24 is of familiar design and includes an ALU34 for performing computations, a collection of registers 36 fortemporary storage of data and instructions, and a control unit 38 forcontrolling operation of the system 20. The CPU 24 may be a processorhaving any of a variety of architectures including Alpha from Digital,MIPS from MIPS Technology, NEC, IDT, Siemens, and others, x86 from Inteland others, including Cyrix, AMD, and Nexgen, and the PowerPC from IBMand Motorola.

[0028] The memory system 26 generally includes high-speed main memory 40in the form of a medium such as random access memory (RAM) and read onlymemory (ROM) semiconductor devices, and secondary storage 42 in the formof long term storage mediums such as floppy disks, hard disks, tape,CD-ROM, flash memory, etc. and other devices that store data usingelectrical, magnetic, optical or other recording media. The main memory40 also can include video display memory for displaying images through adisplay device. Those skilled in the art will recognize that the memory26 can comprise a variety of alternative components having a variety ofstorage capacities.

[0029] The input and output devices 28 and 30 also are familiar. Theinput device 28 can comprise a keyboard, a mouse, a physical transducer(e.g., a microphone), etc. In addition, input device 28 includes anoptical scanner that optically scans printed and other written documentsor materials (together referred to as printed documents) to generatedigitized images of them. The output device 30 can comprise a display, aprinter, a transducer (e.g., a speaker), etc. Some devices, such as anetwork interface or a modem, can be used as input and/or outputdevices.

[0030] As is familiar to those skilled in the art, the computer system20 further includes an operating system and at least one applicationprogram. The operating system is the set of software which controls thecomputer system operation and the allocation of resources. Theapplication program is the set of software that performs a task desiredby the user, using computer resources made available through theoperating system. Both are resident in the illustrated memory system 26.

[0031] In accordance with the practices of persons skilled in the art ofcomputer programming, the present invention is described below withreference to acts and symbolic representations of operations that areperformed by computer system 20, unless indicated otherwise. Such actsand operations are sometimes referred to as being computer-executed andmay be associated with the operating system or the application programas appropriate. It will be appreciated that the acts and symbolicallyrepresented operations include the manipulation by the CPU 24 ofelectrical signals representing data bits which causes a resultingtransformation or reduction of the electrical signal representation, andthe maintenance of data bits at memory locations in memory system 26 tothereby reconfigure or otherwise alter the computer system's operation,as well as other processing of signals. The memory locations where databits are maintained are physical locations that have particularelectrical, magnetic, or optical properties corresponding to the databits.

[0032]FIG. 2 is a functional block diagram illustrating functionsperformed by an electronic circuit optimization modeling software engine100 that is separate from an electronic circuit simulator 102. Simulator102 may be any widely available simulator such as such as SPICE, HSPICE,Spectre, etc., or any other custom simulator. These simulators formulateand solve the nonlinear algebraic differential equations associated withan electronic circuit design.

[0033] Optimization software 100 performs a sensitivity analysis 104that generates sensitivity data that may be used for design optimization106 and a mismatch analysis 108. Sensitivity analysis 104 providesinformation about how each circuit parameter affects the circuit outputperformance. This allows a circuit designer to identify parameterchanges that will optimize output performance for key specifications.

[0034] Design optimization 106 may be characterized as defining a amapping of a multi-dimensional space in which each dimension correspondsto a different design specification into a one-dimensional space bymeans of an objective function of the circuit. Often the fulldimensionality of the parameter space is not allowed, so the problem isfurther constrained by additional constraint functions. In thischaracterization, design optimization 106 amounts to adjusting circuitperformance so that quality is optimized while necessary constraints aremaintained. Design optimization 106 is completed when the parametersfall within the allowed constraints and quality is optimized.

[0035] Mismatch analysis 108 minimizes the effect that individualcomponents have on overall performance. Circuit components that matcheach other help to achieve the maximum circuit performance and reducethe risk that manufacturing process variations will cause the circuit tofail production tests or in an end-user system. Circuit components areconsidered to match each other when a circuit behavior is a function ofthe matching components' ratio, rather than the parameters of theindividual components.

[0036] The sensitivity data generated by sensitivity analysis 104 mayalso be used to conduct a statistical analysis 110 that is used indesign centering 112. Design centering 112 is directed to optimizingmanufacturing yields. Statistical analysis 110 applies process variationdata 114 that represents circuit performance characteristics associatedwith particular manufacturing processes to the sensitivity data. In oneimplementation, statistical analysis 110 employs a Monte Carlo analysisthat randomly varies every parameter in the circuit design, with“trials” being generated for each set of parameter values. In otherimplementations, statistical analysis 110 may employ Root Sum SquareAnalysis (RSS) or Worst Case Analysis (WCA, sometimes referred to asExtreme Value Analysis or EVA), as are known in the art.

[0037]FIG. 3 is a component block diagram illustrating sensitivityanalysis software 120 for performing sensitivity analysis 104.Sensitivity analysis software 120 includes a sensitivity softwareoperation engine 122, sometimes called OpSens 122, which manages theoperations for computing circuit output sensitivity to variations incircuit parameters and components. Sensitivity software engine 122communicates with a separate circuit simulator 102 via a front-endinterface 126 and a back-end interface 128.

[0038] Sensitivity software engine 122 and circuit simulator 102typically would employ different data formats for electronic circuitspecifications and simulations. Front-end interface 126 and back-endinterface 128 provide communication and data conversion betweensensitivity software engine 122 and circuit simulator 102. Simulator 102provides circuit definition and simulation data to sensitivity engine122 via back-end interface 128, and sensitivity engine 122 passessimulation commands to simulator 102 via front-end interface 126.Front-end interface 126 and back-end interface 128 are particularlyadapted to the data format of circuit simulator 102 and allowsensitivity software engine 122 to be generically used with differentcircuit simulators having different data formats.

[0039] For purposes of illustration, FIG. 4 is a circuit schematicdiagram of circuit components of a simple operational amplifier circuit.In one implementation, the circuit definition and simulation data may berepresented as a “netlist,” which is a description of an integratedcircuit design as is known in the art. In one implementation, a netlistdescription may have the following data structure: *VDD 0 21 5.0 Vs 0 215.0 Vd 20 0 5.0 Vin in 0 AC 1 DC 1 PWL 0,−10 100u,10 *Vin in 0 AC 1 DC 1sin(0 3 1Meg) *Vin in 0 pulse(0 1 0 .1n .1n 1us 2us) R1 in VN 10ktc1=−.2 R2 VN VO 10k tc1=0.2 VP VP 0 DC 0 Xop1 VO VP VN 20 21 amp.subckt amp VO VP VN NET67 NET34 R77 NET32 VO 2E3 M=1.0 tc1=−.2 C76NET48 NET32 1E-12 M=1.0 *V70 0 NET34 5.0 *V12 NET67 0 5.0 M6 NET48 VPNET44 NET67 PMOS L=4E-6 W=30E-6 M=1.0 M3 NET35 VN NET44 NET67 PMOSL=4E-6 W=30E-6 M=1.0 M9 VO NET48 NET34 NET34 NMOS L=3E-6 W=154.2E-6M=1.0 M4 NET35 NET35 NET34 NET34 NMOS L=4E-6 W=15E-6 M=1.0 M7 NET48NET35 NET34 NET34 NMOS L=4E-6 W=15E-6 M=1.0 M2 NET54 NET54 NET34 NET34NMOS L=32E-6 W=3E-6 M=1.0 M8 VO NET54 NET67 NET67 PMOS L=4E-6 W=200E-6M=1.0 M1 NET54 NET54 NET67 NET67 PMOS L=4E-6 W=12E-6 M=1.0 M5 NET44NET54 NET67 NET67 PMOS L=4E-6 W=30E-6 M=1.0 .ends amp .end

[0040] The circuit definition and simulation data are stored in asimulation results database 130. Sensitivity engine 122 cooperates witha sensitivity calculator 132 to determine sensitivity data from thecircuit definition and simulation data in simulation results database130. Sensitivity calculator 132 may be controlled by calculator scripts134. The sensitivity data are held in a sensitivity file 136 that may beused, for example, in statistical analyses 110.

[0041] Sensitivity engine 122 uses circuit simulator 102 to simulate theselected circuit and, using data gathered from this nominal simulation,builds one or more modified adjoint circuits. Sensitivity engine 122then uses circuit simulator 102 to simulate the one or more adjointcircuits. The outputs from these nominal and adjoint simulations areused to populate database 130 with sensitivity information for eachvariable in the circuit network, which allows identification of thecircuit components to which the circuit outputs are most sensitive. Thissensitivity information can be used for design optimization, centering,and other analyses. For example, sorting routines can assist inidentifying the most sensitive parameters, thus simplifying the task fordesigners to reduce circuit sensitivity to component variations.

[0042] The sensitivity S_(x) ^(P) is a measure of the effect on circuitperformance P (sometimes called an observable) due to the variation ofsome circuit element x:$S_{x}^{P} = {\frac{x}{P}\quad {\frac{\partial P}{\partial x}.}}$

[0043] Sensitivities relating to multiple parameters, as is typical, maybe expressed as$S_{x_{i}}^{P} = {\frac{x_{i}}{P}\quad \frac{\partial P}{\partial x_{i}}}$

[0044] where i indexes the parameter. The sensitivity is anindispensable tool for the design, test, and optimization of circuits.For instance, a large class of optimization methods rely heavily ongradients, which are denoted by $\frac{\partial P}{\partial x}$

[0045] and give information essentially equivalent to sensitivities.

[0046] An efficient and accurate method of generating sensitivities forcircuits is thus a crucial need for circuit designers.

[0047] The qualifier “efficient” is important. Sensitivities may begenerated by numerical differentiation, (sometimes called the bruteforce, or the direct method). With this method, one parameter at a timeout of the N is varied slightly, or perturbed, the simulation is rerun,and P is calculated again. The numerical derivative, and hence thesensitivity, is constructed from the difference between this value of Pand the original. This is quite straightforward, but with N adjustableparameters it requires N+1 simulations at every step. With simulationscorrespondingly slow (likely on the order of order O(N) time at least),this results in at least O(N²) complexity. With elements running intothe thousands, unmanageable run times are quickly reached.

[0048] The adjoint method, or the adjoint network method, usestechniques of linear algebra to map a circuit into a related “adjoint”circuit. A single simulation of this adjoint circuit yields thederivatives of any circuit performance measure (observable) P withrespect to all parameters of interest:$\frac{\partial P}{\partial x_{i}},{i = {\left( {1,2,\ldots \quad,N} \right).}}$

[0049] This is a very efficient method for two reasons: (1) After theoriginal simulation, only one simulation per performance measure (P) isneeded, regardless of the number of adjustable parameters. (2) Theadjoint circuit is linear, even if the original circuit is not, soadjoint simulations are likely to be faster than the original. However,the statement (3) above points out a problem with the conventionaladjoint circuit method. It can sometimes give inaccurate and misleadingresults when nonlinear elements are present in the original circuit.

[0050] Analytical Example: Conventional Adjoint Method with NonlinearElements

[0051]FIG. 5 illustrates an ideal voltage-controlled resistor. Theresistance R_(s), is fixed at a factor 1/α times the voltage at thefirst node of the resistor ν₁. This problem may be treated analytically.There is one circuit equation

ν−I(R ₁ +R ₂ +R _(s))=0  (1)

[0052] and one equation for the resistor

ν−IR ₁ +αR _(s)  (2)

[0053] so the solution is $\begin{matrix}{R_{s} = \frac{{- \left( {{\alpha \quad R_{1}} + {\alpha \quad R_{2}} - v} \right)} + \sqrt{\left( {{\alpha \quad R_{1}} + {\alpha \quad R_{2}} - v} \right)^{2} + {4\alpha \quad R_{2}v}}}{2\alpha}} & (3)\end{matrix}$

[0054] from which the other quantities may be easily determined.

[0055] The conventional implementation of the adjoint network methodsubstitutes the above value of R_(s) back into the circuit equation. (Inthe more general nonanalytical case, this value would have beendetermined by a simulation.) This value of R_(s), is fixed. Given thevalues (ν, R₁, R₂), the R_(s) value chosen above will be consistent, andthe circuit might as well be linear.

[0056] Consider what happens when one of the parameters, say R₁, changesslightly, with the voltage μ₂ chosen as the observable. By an elementaryapplication of the adjoint network method (or just by directdifferentiation) the following may be derived: $\begin{matrix}{\left( \frac{\partial v_{2}}{\partial R_{1}} \right)_{U} = {\frac{- {vR}_{2}}{\left( {R_{1} + R_{2} + R_{s}} \right)^{2}} = \frac{- {vR}_{2}}{{\overset{\_}{R}}^{2}}}} & (4)\end{matrix}$

[0057] where {overscore (R)}≡R₁+R₂+R_(s). The U subscript designates“Uncorrected”, as explained below. By differentiating equations (1) and(2) above with respect to R₁, and eliminating$\frac{\partial R_{s}}{\partial R_{1}},$

[0058] the exact, analytical result is: $\begin{matrix}{\left( \frac{\partial v_{2}}{\partial R_{1}} \right)_{E} = {{R_{2}\frac{\partial I}{\partial R_{1}}} = {R_{2}\frac{{I\quad \alpha} - I^{2}}{{IR}_{1} - {\alpha \quad \overset{\_}{R}}}}}} & (5)\end{matrix}$

[0059] where the E subscript means “Exact.” The Exact and Uncorrectedquantities are not the same, as the plot of FIG. 6 shows. Thisdiscrepancy can affect optimization.

[0060] Consider an optimization that holds R₂,α, and ν constant, andmaximizes the power I²R₁ across R₁. FIG. 7 is a graph of I²R₁ vs. R₁with R2=1000,ν=,1,α=0.01. This graph shows that that the maximum poweroccurs at about R₁−900. But if the uncorrected values had been used (inother words set$\left. {\frac{\partial R_{s}}{\partial R_{1}} = 0} \right),$

[0061] we would have$P = {{I^{2}R_{1}} = \frac{v^{2}R_{1}}{{\overset{\_}{R}}^{2}}}$

[0062] and$\frac{\partial P}{\partial R_{1}} = {\frac{v^{2}}{{\overset{\_}{R}}^{2}} - \frac{2R_{1}v^{2}}{{\overset{\_}{R}}^{3}}}$

[0063] with zero at R₂+R=R₁. This relation, as well as the equationν−IR₁=αR_(s),is satisfied at the point R₂=1000,R_(s)=500,R₁=1500,I=1/(3000). However, this point is clearly not the true power maximum.(Notice this is not a problem when numerical derivatives are computed.There, slight variations of elements will be countered byself-adjustment of the nonlinear devices, and when the simulatorconverges the observed values are the correct ones.)

[0064] Operating Point Sensitivity Correction due to Nonlinearity

[0065] The present invention enhances the adjoint network method. Theeffects of nonlinear circuit elements are represented by augmenting theelements of the adjoint network. In particular, deviations away fromlinearity are represented in the original circuit by “fictitious”voltage sources. These voltage sources will map into “fictitious”current sources in the adjoint network. These sources are not static;they are directly proportional to the adjoint current through the branchcorresponding to the nonlinear element. As such they may be classifiedas current-controlled current sources and are sometimes referred to as“correction” sources.

[0066] As might be expected, the coefficient by which the correctionsource is proportional to the adjoint current is itself a multiple ofthe nonlinearity of the device, as measured by the derivative of theimpedance or admittance with respect to the voltage across the device.Thus, linear devices require no correction. Several common descriptionsof nonlinear elements are illustrated with respect to:

[0067] (1) admittance

[0068] (2) impedance

[0069] (3) gain (g ) characterization of voltage-controlled currentsource Although the solution to the operating or quiescent point problemis independent of the description, it is instructive to tailor thealgorithm to suit the representation at hand.

[0070] Admittance Case

[0071]FIG. 8 illustrates a nonlinear element in which the current acrossthe element is a function of the voltages at the two nodes. For mostcases of interest the current is a function only of the differencebetween the voltages, ν₂−ν₁. In addition, one of the nodes will be atground. However, these conditions do not always hold; even in the simplevoltage-controlled resistance above, for instance, they are violated. Sothe most general case will be solved, where I=I(ν₁,ν₂). It is useful todefine an admittance $y \equiv \frac{I}{v_{2} - v_{1}}$

[0072] where it is understood that y=y(ν₁, ν₂), unlike the linear case.This definition will allow the effect of the nonlinearity to beisolated. The case of one control will first be described, and the caseof multiple controls will be described later.

[0073]FIG. 9 illustrates the nonlinear element of FIG. 8 with its stateat the quiescent or operating point O given by the values$\left( {v_{10},v_{20},I_{0},{y_{0} \equiv \frac{I_{0}}{v_{20} - v_{10}}}} \right).$

[0074] For perturbations about this operating point O, the admittancewill be given by:${y = {y_{0} + {\frac{\partial y}{\partial y_{1}}\Delta \quad v_{1}} + {\frac{\partial y}{\partial v_{2}}\Delta \quad v_{2}}}},$

[0075] where

Δν₁=ν₁−ν₁₀,Δν₂=ν₂−ν₂₀.

[0076] As illustrated in FIG. 9, the nonlinear element may be“replaced,” to first order in Δν₁, Δν₂, with a linear element of nominaladmittance y₀, plus two voltage sources σ₁Δν₁ and σ₂Δν₂ where:$\begin{matrix}{{{\sigma_{1} \equiv \frac{\frac{\partial y}{\partial v_{1}}\left( {v_{20} - v_{10}} \right)}{y_{0}}} = \frac{\frac{\partial y}{\partial v_{1}}I_{0}}{y_{0}^{2}}},} & (6) \\{{\sigma_{2} \equiv \frac{\frac{\partial y}{\partial v_{2}}\left( {v_{20} - v_{10}} \right)}{y_{0}}} = \frac{\frac{\partial y}{\partial v_{2}}I_{0}}{y_{0}^{2}}} & (7)\end{matrix}$

[0077] The nonlinear element is replaced in that the currents of thenonlinear and linear elements are the same so that the branches areindistinguishable. The current in the nonlinear element beforereplacement:$\left. {\left( {y_{0} + {\frac{\partial y}{\partial v_{1}}\Delta \quad v_{1}} + {\frac{\partial y}{\partial v_{2}}\Delta \quad v_{2}}} \right)\left( {v_{20} + {\Delta \quad v_{2}} - v_{10} - {\Delta \quad v_{1}}} \right)_{2}} \right)$

[0078] can be demonstrated to be is equal to that after replacement:

y ₀(ν₂₀+Δν₂−ν₁₀−Δν₁+σ₁Δν₁+σ₂Δν)

[0079] to first order. First, the zero-order terms are clearly equal;the first-order terms are:${\left( {{\frac{\partial y}{\partial v_{1}}\Delta \quad v_{1}} + {\frac{\partial y}{\partial v_{1}}\Delta \quad v_{2}}} \right)\quad \left( {v_{20} - v_{10}} \right)} + {y_{0}\left( {{\Delta \quad v_{2}} - {\Delta \quad v_{1}}} \right)}$

[0080] and

y ₀(Δν₂−Δν₁+σ₁Δν₁+σ₂Δν₂),

[0081] respectively. Subtracting the y₀(Δν₂−Δν₁) from both, and usingequations (6) and (7) these are trivially equal.

[0082] This shows that a nonlinear effect may be modeled by linearelements that can be easily handled by the adjoint process. To beprecise, the nonlinear effect has been incorporated into a pair ofvoltage sources, σ₁Δν₁=σ₁(ν₁−ν₁₀) and σ₂Δν₂=σ₂(ν₂−ν₂₀). In going to theadjoint network, the constant terms in the sources disappear, as knownin the art, and the voltage sources become corresponding current sources${{\sigma_{1}\hat{I}} = {{\frac{\frac{\partial y}{\partial v_{1}}}{y_{0}^{2}}I_{0}\hat{I}\quad {and}\quad \sigma_{2}\hat{I}} = {\frac{\frac{\partial y}{\partial v_{2}}}{y_{0}^{2}}I_{0}\hat{I}}}}\quad$

[0083] where the I is the current through the adjoint elementcorresponding to the nonlinear element as shown in FIG. 9. The desiredderivatives will be products like I₀ Î, as described below in greaterdetail with reference to a full adjoint network construction.

[0084] Impedance Case

[0085] The analysis of the shifting operating point problem usingadmittances is solved above, but admittances may not necessarily be themost accessible quantities. If impedances are specified, the extensionis straightforward. Since ${R = \frac{1}{y}},$

[0086] then: $\begin{matrix}{\sigma_{1} = {{\frac{\partial\left( \frac{1}{R_{1}} \right)}{\partial v_{1}}\quad \frac{I_{0}}{y_{0}^{2}}} = {{- \frac{1}{R^{2}}}\quad \frac{\partial R}{\partial v_{1}}\quad \frac{I_{0}}{y_{0}^{2}}\quad {or}}}} & (8) \\{\sigma_{1} = {{{- I_{0}}\frac{\partial R}{\partial v_{1}}\quad {and}\quad {likewise}\quad \sigma_{2}} = {{- I_{0}}{\frac{\partial R}{\partial v_{2}}.}}}} & (9)\end{matrix}$

[0087]FIG. 11 is a flow diagram illustrating an adjoint sensitivitymethod 150. Sensitivity method 150 includes a step 152 of conducting afirst or original simulation of a nominal electronic circuitspecification or model and receiving results of the first simulation.

[0088] A step 154 represents the effects of nonlinear circuit elements(i.e., deviations away from linearity) in the original or nominalcircuit by applying fictitious voltage sources.

[0089] A step 156 generates an adjoint of the nominal electronic circuitbased upon the results of the first simulation, including mapping thefictitious voltage sources representing nonlinear circuit elements intofictitious current sources in the adjoint network.

[0090] A step 158 conduct a simulation of the adjoint of the circuit bythe electronic circuit simulator and receives results of the adjointsimulation.

[0091] A step 160 calculates a circuit sensitivity analysis of thenominal electronic circuit specification based upon the results of thesimulations of the nominal electronic circuit and its adjoint.

[0092] Adjoint Network Derivation

[0093] It is instructive to explore in more detail the changesintroduced into the adjoint circuit. Although one could simply writedown the adjoint terms corresponding to the added voltage sources, it ismore instructive to re-derive the results from first principles. Thisderivation begins with a circuit (FIG. 12), which is a generalization ofthe sample circuit of FIG. 5, and uses impedances rather thanadmittances because of the topology of the circuit. R* designates avariable impedance of the nonlinear element. The circuit equations are

ν−IR ₁−ν₁=0  (11a)

ν₁ −IR*−ν ₂−0  (11b)

ν₂ −IR ₂=0  (11c)

[0094] and the nonlinear device equation is

R*−f(ν₁,ν₂)=0  (11d)

[0095] Consider measurements of ν₂, meaning that the following aredesired$\frac{\partial v_{2}}{\partial R_{1}},\frac{\partial v_{2}}{\partial R_{2}},\frac{\partial v_{2}}{\partial v}$

[0096] The Lagrangian multiplier formulation is known in the art. R. A.Rohrer, “Fully Automated Network Design by Digital Computer: PreliminaryConsiderations,” Proc. IEEE, 55, 1929-1939 (1967). We construct the formconsisting of the system variable ν₂ whose derivatives are of interest,combined with the circuit constraint equations (11):

Γ=ν₂+λ₁(ν−IR ₁−ν₁)+λ₂(ν₁ −IR*−ν ₂)+λ₃(ν₂ −IR ₂)+λ₄(R*−f(ν₁,ν₂))  (12)

[0097] Then the equations are solved for the system variables:${{{{{\frac{\delta \quad \Gamma}{\delta \quad v_{1}} = {{- \lambda_{1}} + \lambda_{2} - {\lambda_{4}\frac{\partial f}{\partial v_{1}}}}}}_{0} = 0}{\frac{\delta \quad \Gamma}{\delta \quad v_{2}} = {1 - \lambda_{2} + \lambda_{3} - {\lambda_{4}\frac{\partial f}{\partial v_{2}}}}}}}_{0} = 0$$\frac{\delta \quad \Gamma}{\delta \quad I} = {{{{- \lambda_{1}}R_{1}} - {\lambda_{2}R^{*}} - {\lambda_{3}{R_{2}}_{0}}} = 0}$

[0098] where the |₀ designates that values are to be taken at theoperating point.

[0099] Ordinarily this would complete the analysis, however, R* is now asystem variable:$\frac{\delta \quad \Gamma}{\delta \quad R^{*}} = {{{{- \lambda_{2}}I} + \lambda_{4}} = 0}$

[0100] The factor λ₄ is eliminated by the last equation so that theadjoint circuit (FIG. 13) may be read off from the first threeequations. These equations require the introduction of two currentsources, $\lambda_{2}I\frac{\partial f}{\partial v_{1}}$

[0101] and ${\lambda_{2}I\frac{\partial f}{\partial v_{2}}},$

[0102] in exact agreement with the earlier results. The following canalso be expressed: $\begin{matrix}{\frac{\partial v_{2}}{\partial R_{1}} = {\frac{\delta \quad \Gamma}{\delta \quad R_{1}} = {{- I}\quad \lambda_{1}}}} & \text{(13a)} \\{\frac{\partial v_{2}}{\partial R_{2}} = {\frac{\delta \quad \Gamma}{\delta \quad R_{2}} = {{- I}\quad \lambda_{3}}}} & \text{(13b)} \\{\frac{\partial v_{2}}{\partial v} = {\frac{\delta \quad \Gamma}{\delta \quad v} = \lambda_{1}}} & \text{(13c)}\end{matrix}$

[0103] Notice, as mentioned before, that one can retrieve thederivatives of ν₂ with respect to all parameters of interest with justone adjoint simulation.

[0104] Comparison of Analytical and Adjoint Network Computations

[0105] These results can be tested directly with the voltage-controlledresistor case in which${{f\left( {v_{1},v_{2}} \right)} = \frac{v_{1}}{\alpha}},{\frac{\partial f}{\partial v_{1}} = {{\frac{1}{\alpha}\quad {and}\quad \frac{\partial f}{\partial v_{2}}} = 0.}}$

[0106] The λ equations become

−λ₁ R ₁−λ₂ R−λ ₃ R ₂=0

[0107]$\lambda_{2} = {\left. {\lambda_{1} + {\frac{I}{\alpha}\lambda_{2}}}\Rightarrow\lambda_{1} \right. = {\left( {1 - \frac{I}{\alpha}} \right)\lambda_{2\quad}}}$

 λ₂=1+λ₃→λ₃=λ₂−1

[0108] We wish to show$\frac{\partial v_{2}}{\partial R_{1}} = {{- I}\quad \lambda_{1}}$

[0109] so we solve for λ₁ to get $\begin{matrix}{{{- \lambda_{1}}I} = {\frac{{- R_{2}}{I\left( {1 - \frac{I}{\alpha}} \right)}}{{R_{1}\left( {1 - \frac{I}{\alpha}} \right)} + R^{*} + R_{2}} = \frac{R_{2}{I\left( {\alpha - I} \right)}}{{IR}_{1} - {\alpha \quad \overset{\_}{R}}}}} & (14)\end{matrix}$

[0110] which precisely matches the earlier result.

[0111] Experimental Results

[0112]FIG. 14 shows a multistage voltage-controlled resistor circuitthat was used to test the adjoint network corrections described above. Aplot of the voltages at various stages is shown in FIG. 15.

[0113]FIG. 16 is a plot directed to V4 the last-stage voltage, and itssensitivity with respect to$v,\frac{\delta \quad v_{4}}{\delta \quad v}$

[0114] (note the scale change). Here a geometric interpretation ispossible. $\frac{\delta \quad v_{4}}{\delta \quad v}$

[0115] should match the actual slope of the V4 curve . The corrected anduncorrected sensitivities are illustrated, and the disparity between thecorrected and the uncorrected is clear. The accuracy of the correctedsensitivity (i.e., how well it matches the derivative) is also clear. Asa check, numerical differentiation was also obtained by varying vslightly at each point. The numerical derivatives match precisely thecorrected adjoint derivatives.

[0116] The CPU requirements for this case were as follows:

[0117] Original simulations: 1.68 seconds

[0118] Uncorrected Adjoint Network simulations: 0.87 seconds

[0119] Corrected Adjoint Network simulations: 0.78 seconds

[0120] Numerical derivatives (to check Corrected Adjoint): 2.85 seconds

[0121] Simulations were performed on an in-house simulator based onrelaxation methods. Surprisingly, the corrected adjoint method tookslightly less time than the uncorrected method. This is probably notsignificant. Both the original simulation and the numericaldifferentiation took substantially longer. This example shows convincingevidence for the efficacy of the corrected adjoint network sensitivitymethod for nonlinear elements.

[0122] Summary

[0123] The following table summarizes the adjoint correction mechanismsdescribed above. This is specialized to the case where one of the nodesof the nonlinear device is at ground, the other at voltage ν. Here I₀ isthe nominal, operating point current through the device, Î is theadjoint current through the device, and Î₊ is the additional adjointcurrent source correction. TABLE I Characterization and Adjoint CircuitCorrection for Nonlinear Devices Characterization of Adjoint CurrentSource nonlinear device: I-V Relations satisfied: Correction admittancey $y = \frac{I}{v}$

${\hat{I}}_{+} = {\frac{\partial y}{\partial v}\quad \frac{I_{0}}{y_{0}^{2}}\hat{I}}$

impedance R $R = \frac{v}{I}$

${\hat{I}}_{+} = {\frac{\partial R}{\partial v}\quad I_{0}\hat{I}}$

[0124] Automated design of analog and mixed-signal circuits is becomingmore and more critical with increases in circuit size. Efficient andaccurate calculation of sensitivities is a crucial part of thatautomation process. The adjoint network method is an efficient methodfor calculating sensitivities, but in its conventional form, ispartially flawed when used in the presence of nonlinear circuit elementsAs described above, the method may be corrected by augmenting theadjoint circuit with current-controlled current sources whosecoefficients are proportional to the measure of the nonlinearity of thedevice.

[0125] The operating point correction introduces current sources intothe adjoint circuit. Each such source is a current-controlled currentsource, which is a standard circuit construct; however, an element ofchoice exists with regard to its implementation. Most simulatorsfunction by repeatedly solving the linear system which we indicatesymbolically by ^(Ax=b) where the ^(A) represents the passive elementsof the circuit, b is a source vector, and x is the state vector. Evennonlinear circuits can be solved this way, by iteration; this is how theoperating point of a nonlinear circuit is found. The point is, thecurrent source we have constructed above is now a linear function of thestate vector. We can represent this by ^(b=Jx+b′), say, where ^(J) isconstant. Then we have a choice whether to solve the system^(Ax=Jx+b′),or ^(Ax−Jx=b′) The first can be solved iteratively; thesecond in one step if, as is typically the case with the adjointcircuit, A is constant. Adjoint simulations are typically much fasterbecause they are linear; it may or may not be worthwhile to modify A inorder to get a quicker solution.

[0126] Having described and illustrated the principles of our inventionwith reference to an illustrated embodiment, it will be recognized thatthe illustrated embodiment can be modified in arrangement and detailwithout departing from such principles. In view of the many possibleembodiments to which the principles of our invention may be applied, itshould be recognized that the detailed embodiments are illustrative onlyand should not be taken as limiting the scope of our invention. Rather,I claim as my invention all such embodiments as may come within thescope and spirit of the following claims and equivalents thereto.

1. An electronic circuit sensitivity analysis method for analyzing sensitivity of an electronic circuit model as represented by electronic circuit model data, comprising: conducting a first computer simulation of the electronic circuit model and receiving results of the first simulation; identifying a nonlinear circuit element in the electronic circuit model and representing a nonlinear effect of the nonlinear circuit element by applying a corresponding voltage source to the electronic circuit model; generating an adjoint of the electronic circuit model based upon the results of the first simulation, including mapping the corresponding voltage source into a current source in the adjoint; conducting a second simulation of the adjoint of the electronic circuit model and receiving results of the second simulation; and conducting a circuit sensitivity analysis of the electronic circuit model based upon the results of the simulations of the electronic circuit model and the adjoint to it.
 2. The method of claim 1 wherein: plural nonlinear circuit elements are identified in the electronic circuit model and nonlinear effects of the plural nonlinear circuit elements are represented by applying plural corresponding voltage sources to the electronic circuit model; and an adjoint of the electronic circuit model is generated based upon the results of the first simulation, including mapping the plural corresponding voltage sources into current sources in the adjoint.
 3. The method of claim 1 in which the current source in the adjoint to which the corresponding voltage source is mapped is a current-controlled current source.
 4. The method of claim 1 in which the nonlinear effect of the nonlinear circuit element is characterized by a nonlinear admittance.
 5. The method of claim 4 in which the current source Î₊ in the adjoint to which the corresponding voltage source is mapped is represented by ${\hat{I}}_{+} = {\frac{\partial y}{\partial v}\quad \frac{I_{0}}{y_{0}^{2}}\hat{I}}$

where y is admittance, v is voltage, I₀ is a nominal, operating point current through the nonlinear circuit element, y₀ is a nominal, operating point admittance of the nonlinear circuit element, and Î is the adjoint current through the nonlinear circuit element.
 6. The method of claim 1 in which the nonlinear effect of the nonlinear circuit element is characterized by a nonlinear impedance.
 7. The method of claim 6 in which the current source Î₊ in the adjoint to which the corresponding voltage source is mapped is represented by ${\hat{I}}_{+} = {{- \frac{\partial R}{\partial v}}I_{0}\hat{I}}$

where R is impedance, v is voltage, I₀ is a nominal, operating point current through the nonlinear circuit element, and Î is the adjoint current through the nonlinear circuit element.
 8. In an electronic circuit sensitivity analysis method for analyzing sensitivity of an electronic circuit model as represented by electronic circuit model data and employing an adjoint of the electronic circuit model, the improvement comprising: identifying a nonlinear circuit element in the electronic circuit model and representing a nonlinear effect of the nonlinear circuit element by applying a corresponding voltage source to the electronic circuit model; and generating the adjoint of the electronic circuit model with a mapping of the corresponding voltage source into a current source in the adjoint.
 9. In an electronic circuit sensitivity analysis method for analyzing sensitivity of an electronic circuit model as represented by electronic circuit model data and employing an adjoint of the electronic circuit model, the improvement comprising: identifying in the electronic circuit model a nonlinear circuit element having a nonlinear effect; and generating the adjoint of the electronic circuit model with a current source representing the nonlinear effect of the nonlinear circuit element.
 10. The method of claim 9 wherein: plural nonlinear circuit elements are identified in the electronic circuit model and have nonlinear effects; and the adjoint of the electronic circuit model is generated plural current sources representing the nonlinear effects of the plural nonlinear circuit elements.
 11. The method of claim 9 in which the nonlinear effect of the nonlinear circuit element is characterized by a nonlinear admittance.
 12. The method of claim 11 in which the current source Î₊ in the adjoint is represented by ${\hat{I}}_{+} = {\frac{\partial y}{\partial v}\frac{I_{0}}{y_{0}^{2}}\hat{I}}$

where y is admittance, v is voltage, I₀ is a nominal, operating point current through the nonlinear circuit element, y₀ is a nominal, operating point admittance of the nonlinear circuit element, and Î is the adjoint current through the nonlinear circuit element.
 13. The method of claim 9 in which the nonlinear effect of the nonlinear circuit element is characterized by a nonlinear impedance.
 14. The method of claim 13 in which the current source Î₊ in the adjoint is represented by ${\hat{I}}_{+} = {{- \frac{\partial R}{\partial v}}I_{0}\overset{\hat{}\quad}{I}}$

where R is impedance, v is voltage, I₀ is a nominal, operating point current through the nonlinear circuit element, and Î is the adjoint current through the nonlinear circuit element.
 15. In an computer readable medium, electronic circuit sensitivity analysis software for analyzing sensitivity of an electronic circuit model as represented by electronic circuit model data and employing an adjoint of the electronic circuit model, the improvement comprising: software for identifying a nonlinear circuit element in the electronic circuit model and representing a nonlinear effect of the nonlinear circuit element by applying a corresponding voltage source to the electronic circuit model; and software for generating the adjoint of the electronic circuit model with a mapping of the corresponding voltage source into a current source in the adjoint.
 16. In a computer readable medium, electronic circuit sensitivity analysis software for analyzing sensitivity of an electronic circuit model as represented by electronic circuit model data and employing an adjoint of the electronic circuit model, the improvement comprising: software for identifying in the electronic circuit model a nonlinear circuit element having a nonlinear effect; and software for generating the adjoint of the electronic circuit model with a current source representing the nonlinear effect of the nonlinear circuit element.
 17. The medium of claim 16 wherein: plural nonlinear circuit elements are identified in the electronic circuit model and have nonlinear effects; and the adjoint of the electronic circuit model is generated plural current sources representing the nonlinear effects of the plural nonlinear circuit elements.
 18. The medium of claim 16 in which the nonlinear effect of the nonlinear circuit element is characterized by a nonlinear admittance.
 19. The medium of claim 18 in which the current source Î₊ in the adjoint is represented by ${\hat{I}}_{+} = {\frac{\partial y}{\partial v}\frac{I_{0}}{y_{0}^{2}}\hat{I}}$

where y is admittance, v is voltage, I₀ is a nominal, operating point current through the nonlinear circuit element, y₀ is a nominal, operating point admittance of the nonlinear circuit element, and Î is the adjoint current through the nonlinear circuit element.
 20. The medium of claim 16 in which the nonlinear effect of the nonlinear circuit element is characterized by a nonlinear impedance.
 21. The medium of claim 20 in which the current source Î₊ in the adjoint is represented by ${\hat{I}}_{+} = {{- \frac{\partial R}{\partial v}}I_{0}\hat{I}}$

where R is impedance, v is voltage, I₀ is a nominal, operating point current through the nonlinear circuit element, and Î is the adjoint current through the nonlinear circuit element. 